package org.example.cloud.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.example.cloud.entities.Order;
import org.example.cloud.service.OrderService;
import org.example.cloud.util.ResultData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 宋孟林
 * @description
 * @date: 2025/4/12 8:04
 */
@RestController
@Slf4j
public class OrderController {
    @Resource
    private OrderService orderService;
    @PostMapping("/order/create")
    public ResultData<Order> create(@RequestBody Order order){
        orderService.create(order);
        return ResultData.success(order);
    }
}
